<?php
require_once "jssdk.php";
$jssdk = new JSSDK("wx9c23eb0a5329ce6d", "fe01663819b38717e1106ae02e75d655");
$signPackage = $jssdk->GetSignPackage("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
$imgUrl = $_GET['imgUrl']
?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>Ethics Day</title>
    <link rel="stylesheet" type="text/css" href="./css/weixin.css">
    <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-68211850-1', 'auto');
  ga('send', 'pageview');

</script>
</head>

<body>
    <div class="weixinImg">
        <img src="./images/weixin.jpg" alt="">
    </div>
    <div class="weixinCont" style="display:none;">
        <ul>
            <div class="time"><img src="./images/time.png" alt=""></div>
            <li class="line">
                <div>
                    <img src="./images/face3.jpg" class="face">
                    <div class="sayCont">
                        <img class="hi"  src="./images/hi.png">
                    </div>
                </div>
            </li>
            <li class="line">
                <div>
                    <img src="<?php echo $imgUrl; ?>" class="face R">
                    <div class="sayCont R">
                    <img src="./images/sayCon_1.png" style="width:100%" alt="">
                    </div>
                </div>
            </li>
            <li class="line">
                <div>
                    <img src="./images/face3.jpg" class="face">
                    <div class="sayCont"  onclick="playOrPaused(0,this)">
                    <img  class="sayOutL" src="./images/sayOutL.png" alt="">
                     <img class="say"  src="./images/say.jpg" alt="">
                    <div class="say" style="width:50%;">
                      
                            <div class="cont"> </div>
                                                                          
                    </div>
                    <span class="sec">32″</span>                    
                        
                    </div>

                </div>
            </li>
            <li class="line">
                <div>
                    <img src="<?php echo $imgUrl; ?>" class="face R">
                    <div class="sayCont R">
                       <img style="width:100%" src="./images/sayCon_2.png">
                    </div>
                </div>
            </li>
            <li class="line">
                <div>
                    <img src="./images/face3.jpg" class="face">
                    <div class="sayCont " onclick="playOrPaused(1,this)">
                    <img  class="sayOutL" src="./images/sayOutL.png" alt="">
                     <img class="say"  src="./images/say.jpg" alt="">
                    <div class="say" style="width: 25%;">
                       
                            <div class="cont"></div>
                                                           
                    </div>
                       <span class="sec">9″</span>
                    </div>
                </div>
            </li>
            <li class="line">
                <div>
                    <img src="<?php echo $imgUrl; ?>" class="face R">
                    <div class="sayCont R">
                         <img style="width:100%" src="./images/sayCon_3.png">
                    </div>
                </div>
            </li>
            <li class="line">
                <div>
                    <img src="./images/face3.jpg" class="face ">
                     
                    <div class="sayCont " onclick="playOrPaused(2,this)" >
                    <img  class="sayOutL" src="./images/sayOutL.png" alt="">
                    <img class="say"  src="./images/say.jpg" alt="">
                    <div class="say" style="width: 30%;">
                       
                            <div class="cont"></div>
                                                           
                    </div>
                      <span class="sec">10″</span>
                    </div>
                </div>
            </li>
            <li class="line">
                <div>
                    <img src="<?php echo $imgUrl; ?>" class="face R">
                    <div class="sayCont R">
                          <img style="width:100%" src="./images/sayCon_4.png">
                    </div>
                </div>
            </li>
            <li class="line">
                <div>
                    <img src="./images/face3.jpg" class="face ">
                    <div class="sayCont " onclick="playOrPaused(3,this)">
                    <img  class="sayOutL" src="./images/sayOutL.png" alt="">
                     <img class="say"  src="./images/say.jpg" alt="">
                    <div class="say" style="width: 40%;">
                       
                            <div class="cont"> </div>
                                                           
                    </div>
                        <span class="sec">21″</span>
                    </div>
                </div>
            </li>
            <div class="addin"><img src="./images/addin.png" alt=""></div>
            <li class="line">
                <div>
                    <img src="./images/face2.jpg" class="face ">
                    <div class="sayCont ">
                        
                          <img style="width:100%" src="./images/sayCon_5.png">
                    </div>
                </div>
            </li>
            <li class="line" id="mySay" style="display:none;">
                <div>
                    <img src="<?php echo $imgUrl; ?>" class="face R">
                    <div class="sayCont R">
                          <img style="width:100%" src="./images/sayCon_6.png">
                    </div>
                </div>
            </li>
             <li class="line" id="lastSay" style="display:none;">
                <div>
                    <img src="./images/face3.jpg" class="face ">
                    <div class="sayCont ">
                        
                          <img style="width:100%" src="./images/sayCon_7.png?v">
                    </div>
                </div>
            </li>
            <li class="line" id="cafeipaper" style="display:none;">
                <div>
                    <img src="./images/face3.jpg" class="face">
                    <div class="sayCont ">
                        <img class="cafei_paper" src="./images/cafei_paper_0.png">
                        <img class="cafei_paper_head" src="./images/cafei_paper_1.png?v">

                    </div>
                </div>
            </li>
           
        </ul>
    </div>
    <div class="footer" style="display:none">
        <div class="ipt" style="display:none">
            <p id="typing">没错，我是很有想法，但是…说好的喝咖啡呢？</p>
        </div>
        <div class="btnSend" style="display:none;" >
            <img src="./images/btn_yuan.png" alt="">
        </div>
        <img id="img_ipt" src="./images/input.jpg" alt="" style="display:block;">
        <img id="img_key_null" src="./images/keyboard_null.jpg" alt="" style="display:none;">
        <img id="img_key" src="./images/keyboard.jpg" alt="" style="display:none;">
    </div>
    <div id="redpaper" style="display:none;">
        <img class="close" src="./images/close.png" alt="">
        <a class="paper too" href="#">
            <img class="paper" src="./images/cafei_paper.jpg" alt="">
        </a>
        <a class="top" href="./cafeipage.php">
            <img class="top" src="./images/top.png" alt="">
        </a>
    </div>
    <ul>
        <li><audio></audio></li>
        <li><audio></audio></li>
        <li><audio></audio></li>
        <li><audio></audio></li>
    </ul>
    <script type="text/javascript" src="./js/zepto/zepto.min.js"></script>
    <script type="text/javascript" src="./js/zepto/src/fx.js"></script>
    <script type="text/javascript" src="./js/zepto/src/fx_methods.js"></script>
    <script type="text/javascript" src="./js/weixin.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript">
    $("img.R").each(function() {
       
        if (this.src == window.location.href) {
            this.src = "./images/face.png";
         
        };
         

    });
        ga('send', 'pageview', '/' + 'weixin');
        wx.config({
            debug: false,
            appId: '<?php echo $signPackage["appId"];?>',
            timestamp: <?php echo $signPackage["timestamp"];?>,
            nonceStr: '<?php echo $signPackage["nonceStr"];?>',
            signature: '<?php echo $signPackage["signature"];?>',
            jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo']
        });
        wx.ready(function() {
            // 在这里调用 API
            wx.onMenuShareTimeline({
                title: '你有一杯咖啡等待领取', // 分享标题
                link: 'http://ethicsday.6edigital.cn/', // 分享链接
                imgUrl: './images/cafei_paper_log.png', // 分享图标
                success: function() {
                    // 用户确认分享后执行的回调函数
                    ga("send","event","ethicsday","onMenuShareTimeline","Share-Circle-Of-Friends",2)
                },
                cancel: function() {
                    // 用户取消分享后执行的回调函数
                    ga("send","event","ethicsday","onMenuShareTimeline","Share-Circle-Of-Friends",2)
                }
            });
            wx.onMenuShareAppMessage({
                title: '你有一杯咖啡等待领取', // 分享标题
                desc: '竟然有这样的好事，还不赶紧？！', // 分享描述
                link: 'http://ethicsday.6edigital.cn/', // 分享链接
                imgUrl: './images/cafei_paper_log.png', // 分享图标
                type: 'link', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function() {
                    // 用户确认分享后执行的回调函数
                    ga("send","event","ethicsday","onMenuShareAppMessage","ShareWeixinMessage",3)
                },
                cancel: function() {
                    // 用户取消分享后执行的回调函数
                    ga("send","event","ethicsday","onMenuShareAppMessage","ShareWeixinMessage",3)
                }
            });
        });
    </script>
</body>

</html>
